#pragma once
#include "mono/pch.h"
#include "mono/Clazz.h"

namespace mono
{
    struct Behivor
    {

        std::string m_Path;

        Behivor() = default;

        Behivor(const std::string &path) : m_Path(path)
        {
            m_Available = Init();
        }

        bool Init();

        bool HasClazz(const std::string &nmsp, const std::string &name)
        {

            Clazz::Desc desc;
            desc.m_Name = name;
            desc.m_Namespace = nmsp;
            return m_Clazzs.find(desc) != m_Clazzs.end();
        };

        bool LoadClazz(const std::string &nmsp, const std::string &name);

        std::shared_ptr<Clazz> GetClazz(const std::string &nmsp, const std::string &name);

        std::map<Clazz::Desc, std::shared_ptr<mono::Clazz>> m_Clazzs;

        MonoAssembly *assembly;

        MonoImage *image;

        bool m_Available;
    };
};